<?php

use p5\objects\SessionUtils ;
use p5\objects\SqlMaker;

function get_global_session_matrix()
{
    return SessionUtils::get_global_session_matrix();
}

function persist_global_session_matrix($matrix)
{
    SessionUtils::persist_global_session_matrix($matrix);
}

function request_to_session($name = "")
{
    SessionUtils::request_to_session($name);
}

function request_to_page_session($name)
{
    SessionUtils::request_to_page_session($name);
}

function get_session($name, $defaultValue = "")
{
    return SessionUtils::get_session($name, $defaultValue);
}

function set_session($name, $object)
{
    SessionUtils::set_session($name, $object);
}

function session_exists($name)
{
    return SessionUtils::session_exists($name);
}

function remove_session($name)
{
    SessionUtils::remove_session($name);
}

function remove_all_session_parameters()
{
    SessionUtils::remove_all_session_parameters();
}

function get_page_parameter_session_key_name()
{
    return SessionUtils::get_page_parameter_session_key_name();
}

function get_page_session_matrix()
{
    return SessionUtils::get_page_session_matrix();
}

function persist_page_session_matrix($matrix)
{
    SessionUtils::persist_page_session_matrix($matrix);
}

function get_page_session($name, $defaultValue = "")
{
    return SessionUtils::get_page_session($name, $defaultValue);
}

function get_session_parameters_with_prefix($prefix)
{
    return SessionUtils::get_session_parameters_with_prefix($prefix);
}

function get_page_session_parameters_with_prefix($prefix)
{
    return SessionUtils::get_page_session_parameters_with_prefix($prefix);
}

function set_page_session($name, $object)
{
    SessionUtils::set_page_session($name, $object);
}

function remove_page_session($name)
{
    SessionUtils::remove_page_session($name);
}

//情况页面所有参数缓存
function remove_all_page_session_parameters()
{
    SessionUtils::clear_page_session();
}

function deep_get($name, $isPageScope = false, $defaultValue = "", $type = "string")
{
    return SessionUtils::deep_get($name, $isPageScope, $defaultValue, $type);
}

function search_parameters_to_page_session()
{
    SessionUtils::search_parameters_to_page_session();
}

function increment_session($key)
{
    return SessionUtils::increment_session($key);
}

function get_sql_limit($link = "and", $auto_persis = true)
{
    return SqlMaker::get_sql_limit($link, $auto_persis);
}

